<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="ui" tagdir="/WEB-INF/tags" %>
<tr>
    <th colspan="4">清单表体信息</th>
</tr>
<tr>
    <td width="15%">商品编码</td>
    <td width="35%">
        <label>
            <input type="hidden" name="id" value="${goods.id}">
            <input type="hidden" name="relatedId" value="${goods.relatedId}">
            <input type="text" name="codeTs" id="hscode">
            <script type="text/javascript">
                function onHsCodeChange(selector, code_t, g_name) {
                    var datas = selector.id().split(_split);
                    $("#gName").val(g_name);

                    var legalun = datas[4] || '';
                    var legaluncn = datas[5] || '';
                    var codeTs = datas[8] || '';

                    $("#hscode").val(codeTs);

                    // 法定单位
                    $("#unit1").val(legalun);
                    $("#unit1XXXX_input").data("text",
                            legaluncn).val((legalun == "" && legaluncn == "") ? "" : (legalun + "/" + legaluncn));
                }

                getCargoHsCode({
                    "id": "hscode",
                    "decType": "1",
                    "columns": ['商品编码', '商品名称', '附加编码', '法定单位'],
                    "onchange": onHsCodeChange
                });
                $("#hscode").val('${goods.codeTs}');
                $("#hscode_input").data("text", '${goods.codeTs}').val('${goods.codeTs}');
            </script>
        </label>
    </td>
    <td width="15%">商品名称</td>
    <td width="35%">
        <label><input type="text" name="gName" value="${goods.gName}"/></label>
    </td>
</tr>
<tr>
    <td>规格型号</td>
    <td>
        <label><input name="gModel" type="text" onkeydown="return false"
                      onfocus="getModelC(this.value)" id="gModel" value="${goods.gModel}"></label>
    </td>
    <td>品牌</td>
    <td>
        <label><input type="text" name="tradeMark" value="${goods.tradeMark}"/></label>
    </td>
</tr>
<tr>
    <td>商品描述</td>
    <td>
        <label><input type="text" name="gDesc" value="${goods.gDesc}"/></label>
    </td>
    <td>数量</td>
    <td>
        <label><input type="text" name="gNum" value="${goods.gNum}"/></label>
    </td>
</tr>
<tr>
    <td>成交单位</td>
    <td>
        <label><ui:tsingletableautocomplete
                keyFieldName="gUnit"
                valueFieldName="gUnitXXXX"
                tableName="S_NUM_UNIT_E"
                key="CODE_C"
                value="NAME_C"
                css="input1"
                defaultKey="${goods.gUnit}"
        /></label>
    </td>
    <td>单价</td>
    <td>
        <label><input type="text" name="price" value="${goods.price}"/></label>
    </td>
</tr>
<tr>
    <td>币制</td>
    <td>
        <label><ui:tsingletableautocomplete
                keyFieldName="currCode"
                valueFieldName="currCodeXXXX"
                tableName="S_CURRENCY_E"
                key="CODE_C"
                value="NAME_C"
                css="input1"
                defaultKey="${goods.currCode}"
        /></label>
    </td>
    <td>法定数量</td>
    <td>
        <label><input type="text" name="qty1" value="${goods.qty1}"/></label>
    </td>
</tr>
<tr>
    <td>法定单位</td>
    <td>
        <label><ui:tsingletableautocomplete
                keyFieldName="unit1"
                valueFieldName="unit1XXXX"
                tableName="S_LAW_UNIT_E"
                key="CODE_C"
                value="NAME_C"
                css="input1"
                defaultKey="${goods.unit1}"
        /></label>
    </td>
    <td>目的国</td>
    <td>
        <label><ui:tsingletableautocomplete
                keyFieldName="originCountry"
                valueFieldName="originCountryXXX"
                tableName="S_ORIGINAL_PLACE_E"
                key="CODE_C"
                value="NAME_C"
                css="input1"
                defaultKey="${goods.originCountry}"
        /></label>
    </td>
</tr>
<tr>
    <td>用途</td>
    <td>
        <label><ui:tsingletableautocomplete
                key="PURPOSECO"
                value="PURPOSECN"
                tableName="S_PURPOSE"
                keyFieldName="useTo"
                css="input1"
                valueFieldName="useToXXX"
                defaultKey="${goods.useTo}"
        /></label>
    </td>
    <td>征免方式</td>
    <td>
        <label><ui:tsingletableautocomplete
                key="DUTYCO"
                value="DUTYCN"
                tableName="S_Duty"
                keyFieldName="dutyMode"
                valueFieldName="dutyModeXXX"
                css="input1"
                defaultKey="${goods.dutyMode}"
        /></label>
    </td>
</tr>
<tr>
    <td>税款</td>
    <td>
        <label>
            <input type="text" name="taxPayment" value="${goods.taxPayment}"/>
        </label>
    </td>
    <td>税率</td>
    <td>
        <label><input type="text" name="taxRate" value="${goods.taxRate}"/></label>
    </td>
</tr>
<tr>
    <td>料件成品标识</td>
    <td>
        <label>
            <input type="text" name="gType" value="${goods.gType}"/>
        </label>
    </td>
    <td>对应账册的商品项号</td>
    <td>
        <label><input type="text" name="emsGNo" value="${goods.emsGNo}"/></label>
    </td>
</tr>
<tr>
    <td>备注</td>
    <td colspan="3"><label><input type="text" name="note" value="${goods.note}" style="width: 100%"/></label></td>
</tr>
<script>
    $(function () {
        $(".table3 td:even").css("background-color", "#f5f5f5");
    });
</script>